export default{
    state:{
        // 控制菜单收缩
        isCollapse:false,
        // 面包屑数据
        tabList:[
            {
                path: "/",
                name: "home",
                label: "首页",
                icon: "s-home",
                url: "Home/Home",
            },
        ]
    },
    mutations:{
        collapseMenu(state){
            state.isCollapse =  !state.isCollapse
            console.log('000');
        },
        //更新面包屑数据
        selectMenu(state,value){
            console.log(value);
            if(value.name !== 'home'){
               const index = state.tabList.findIndex(item => item.name === value.name)
            //  不存在
               if(index===-1){
                state.tabList.push(value)
               }
            }
        }  
    }

}